home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Telephone Manager / Stiletto Sources / ModuleSources / GetDNProgressDet.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-11  |  2.4 KB  |  78 lines  |  [TEXT/MPS ]

  1. /************************************************************************************************/
  2. /*                                                                                                */
  3. /*    Module Name:    GetDNProgressDet                                                            */
  4. /*                                                                                                */
  5. /*    File Name:        GetDNProgressDet.c                                                            */
  6. /*                                                                                                */
  7. /*    © Apple Computer, Inc. 1994-1995                                                            */
  8. /*    All Rights Reserved                                                                            */
  9. /*                                                                                                */
  10. /*    Revision History:                                                                            */
  11. /*                                                                                                */
  12. /*        Date        Who                    Modification                                            */
  13. /*                                                                                                */
  14. /*        1994-11-07    Jaakko Railo        Original version                                        */
  15. /*                                                                                                */
  16. /************************************************************************************************/
  17.  
  18. /****************************************** DESCRIPTION ******************************************
  19.  
  20. *************************************************************************************************/
  21.  
  22. /******************************************** HEADERS *******************************************/
  23.  
  24. #ifndef __TELEPHONES__
  25. #include "Telephones.h"
  26. #endif
  27.  
  28. #include "TestModule.h"
  29.  
  30. /****************************************** DEFINITIONS *****************************************/
  31.  
  32. #define    kProgressDetOn        1
  33. #define    kProgressDetOff        0
  34.  
  35. /****************************************** PROTOTYPES ******************************************/
  36.  
  37. void     DoTest (CHRSPtr paramPtr);
  38.  
  39. /************************************************************************************************/
  40. /************************************************************************************************/
  41.  
  42.  
  43. pascal short TestModule (CHRSPtr paramPtr)
  44. {
  45.     short    returnValue = noErr;
  46.     
  47.     if (paramPtr->version <= kTestModuleVersion) {
  48.         
  49.         DoTest (paramPtr);
  50.         
  51.     }
  52.     else
  53.         returnValue = kWrongVersion;
  54.         
  55.     return (returnValue);
  56. }
  57.  
  58.  
  59. void DoTest (CHRSPtr paramPtr)
  60. {
  61.     TELHandle    termHand = GetCurrentTELHandle (paramPtr);
  62.     TELDNHandle    dnHand;
  63.     OSErr        errCode;
  64.     long        selector = nil;
  65.     Boolean        progressDet;
  66.     
  67.     if ((dnHand = GetDNHandle (paramPtr)) != nil) {
  68.             
  69.         if ((errCode = TELGetDNProgressDet (dnHand, selector, &progressDet)) == noErr)
  70.             Print (paramPtr, "TELGetDNProgressDet --> Progress Detect = %s", 
  71.                     ((progressDet==kProgressDetOn)?"ProgressDetOn":"ProgressDetOff"));
  72.         else
  73.             Print (paramPtr, "### TELGetDNProgressDet failed : %d", errCode);
  74.     }
  75.     else
  76.         Print (paramPtr, "### Unable to retrieve the DN handle");
  77. }
  78.